﻿using System;
using System.Text.RegularExpressions;

namespace SpecFlowTfsLinker.Cleaner
{
    [Serializable]
    public class ParameterCleaner : Cleaner
    {
        public ParameterCleaner(string statementToClean)
            : base(statementToClean)
        {
        }

        public override string Clean()
        {
            //TODO Refacto
            if (StatementToClean.StartsWith("\"") && StatementToClean.EndsWith("\"") || StatementToClean.StartsWith("'") && StatementToClean.EndsWith("'"))
            {
               StatementToClean =  StatementToClean.Remove(0,1);
               StatementToClean =  StatementToClean.Remove(StatementToClean.Length - 1,1);
            }

            return StatementToClean;
        }
    }
}
